// #ifndef VUE3
import Vue from "vue";
import App from "./App";

Vue.config.productionTip = false;

App.mpType = "app";

const app = new Vue({
  ...App,
});
app.$mount();
// #endif

// #ifdef VUE3
import { createSSRApp } from "vue";
import * as Pinia from "pinia";
import App from "./App.vue";
import uvUI from "@/uni_modules/uv-ui-tools";
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
import { VueQueryPlugin } from "vue-query";
import { Request } from "@/utils/http";
uni.$uv.setConfig({
	config: {
			// 修改默认单位为rpx，相当于执行 uni.$uv.config.unit = 'rpx'
			unit: 'px'
	},
})
export function createApp() {
  const app = createSSRApp(App);
  const pinia = Pinia.createPinia();
  pinia.use(piniaPluginPersistedstate);
  app.use(pinia);
  app.use(VueQueryPlugin);
  Request(app);
  app.use(uvUI,{mpShare:true})
  return {
    app,
    Pinia, // 此处必须将 Pinia 返回
  };
}
// #endif
